3.7 \(\int \tan ^7(c+d x) \, dx\)

Optimal. Leaf size=57 \[ \frac{\tan ^6(c+d x)}{6 d}-\frac{\tan ^4(c+d x)}{4 d}+\frac{\tan ^2(c+d x)}{2 d}+\frac{\log (\cos (c+d x))}{d} \]

[Out]

Log[Cos[c + d*x]]/d + Tan[c + d*x]^2/(2*d) - Tan[c + d*x]^4/(4*d) + Tan[c + d*x]^6/(6*d)

________________________________________________________________________________________

Rubi [A]  time = 0.0267256, antiderivative size = 57, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 2, integrand size = 8, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.25, Rules used = {3473, 3475} \[ \frac{\tan ^6(c+d x)}{6 d}-\frac{\tan ^4(c+d x)}{4 d}+\frac{\tan ^2(c+d x)}{2 d}+\frac{\log (\cos (c+d x))}{d} \]

Antiderivative was successfully verified.

[In]

Int[Tan[c + d*x]^7,x]

[Out]

Log[Cos[c + d*x]]/d + Tan[c + d*x]^2/(2*d) - Tan[c + d*x]^4/(4*d) + Tan[c + d*x]^6/(6*d)

Rule 3473

Int[((b_.)*tan[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(b*(b*Tan[c + d*x])^(n - 1))/(d*(n - 1)), x] - Dis
t[b^2, Int[(b*Tan[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1]

Rule 3475

Int[tan[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[Log[RemoveContent[Cos[c + d*x], x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

\begin{align*} \int \tan ^7(c+d x) \, dx &=\frac{\tan ^6(c+d x)}{6 d}-\int \tan ^5(c+d x) \, dx\\ &=-\frac{\tan ^4(c+d x)}{4 d}+\frac{\tan ^6(c+d x)}{6 d}+\int \tan ^3(c+d x) \, dx\\ &=\frac{\tan ^2(c+d x)}{2 d}-\frac{\tan ^4(c+d x)}{4 d}+\frac{\tan ^6(c+d x)}{6 d}-\int \tan (c+d x) \, dx\\ &=\frac{\log (\cos (c+d x))}{d}+\frac{\tan ^2(c+d x)}{2 d}-\frac{\tan ^4(c+d x)}{4 d}+\frac{\tan ^6(c+d x)}{6 d}\\ \end{align*}

Mathematica [A]  time = 0.0989485, size = 47, normalized size = 0.82 \[ \frac{2 \tan ^6(c+d x)-3 \tan ^4(c+d x)+6 \tan ^2(c+d x)+12 \log (\cos (c+d x))}{12 d} \]

Antiderivative was successfully verified.

[In]

Integrate[Tan[c + d*x]^7,x]

[Out]

(12*Log[Cos[c + d*x]] + 6*Tan[c + d*x]^2 - 3*Tan[c + d*x]^4 + 2*Tan[c + d*x]^6)/(12*d)

________________________________________________________________________________________

Maple [A]  time = 0.003, size = 57, normalized size = 1. \begin{align*}{\frac{ \left ( \tan \left ( dx+c \right ) \right ) ^{6}}{6\,d}}-{\frac{ \left ( \tan \left ( dx+c \right ) \right ) ^{4}}{4\,d}}+{\frac{ \left ( \tan \left ( dx+c \right ) \right ) ^{2}}{2\,d}}-{\frac{\ln \left ( 1+ \left ( \tan \left ( dx+c \right ) \right ) ^{2} \right ) }{2\,d}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(tan(d*x+c)^7,x)

[Out]

1/6*tan(d*x+c)^6/d-1/4*tan(d*x+c)^4/d+1/2*tan(d*x+c)^2/d-1/2/d*ln(1+tan(d*x+c)^2)

________________________________________________________________________________________

Maxima [A]  time = 0.945125, size = 100, normalized size = 1.75 \begin{align*} -\frac{\frac{18 \, \sin \left (d x + c\right )^{4} - 27 \, \sin \left (d x + c\right )^{2} + 11}{\sin \left (d x + c\right )^{6} - 3 \, \sin \left (d x + c\right )^{4} + 3 \, \sin \left (d x + c\right )^{2} - 1} - 6 \, \log \left (\sin \left (d x + c\right )^{2} - 1\right )}{12 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(d*x+c)^7,x, algorithm="maxima")

[Out]

-1/12*((18*sin(d*x + c)^4 - 27*sin(d*x + c)^2 + 11)/(sin(d*x + c)^6 - 3*sin(d*x + c)^4 + 3*sin(d*x + c)^2 - 1)
 - 6*log(sin(d*x + c)^2 - 1))/d

________________________________________________________________________________________

Fricas [A]  time = 1.52297, size = 131, normalized size = 2.3 \begin{align*} \frac{2 \, \tan \left (d x + c\right )^{6} - 3 \, \tan \left (d x + c\right )^{4} + 6 \, \tan \left (d x + c\right )^{2} + 6 \, \log \left (\frac{1}{\tan \left (d x + c\right )^{2} + 1}\right )}{12 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(d*x+c)^7,x, algorithm="fricas")

[Out]

1/12*(2*tan(d*x + c)^6 - 3*tan(d*x + c)^4 + 6*tan(d*x + c)^2 + 6*log(1/(tan(d*x + c)^2 + 1)))/d

________________________________________________________________________________________

Sympy [A]  time = 0.920456, size = 56, normalized size = 0.98 \begin{align*} \begin{cases} - \frac{\log{\left (\tan ^{2}{\left (c + d x \right )} + 1 \right )}}{2 d} + \frac{\tan ^{6}{\left (c + d x \right )}}{6 d} - \frac{\tan ^{4}{\left (c + d x \right )}}{4 d} + \frac{\tan ^{2}{\left (c + d x \right )}}{2 d} & \text{for}\: d \neq 0 \\x \tan ^{7}{\left (c \right )} & \text{otherwise} \end{cases} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(d*x+c)**7,x)

[Out]

Piecewise((-log(tan(c + d*x)**2 + 1)/(2*d) + tan(c + d*x)**6/(6*d) - tan(c + d*x)**4/(4*d) + tan(c + d*x)**2/(
2*d), Ne(d, 0)), (x*tan(c)**7, True))

________________________________________________________________________________________

Giac [B]  time = 10.3129, size = 1094, normalized size = 19.19 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(d*x+c)^7,x, algorithm="giac")

[Out]

1/12*(6*log(4*(tan(c)^2 + 1)/(tan(d*x)^4*tan(c)^2 - 2*tan(d*x)^3*tan(c) + tan(d*x)^2*tan(c)^2 + tan(d*x)^2 - 2
*tan(d*x)*tan(c) + 1))*tan(d*x)^6*tan(c)^6 + 11*tan(d*x)^6*tan(c)^6 - 36*log(4*(tan(c)^2 + 1)/(tan(d*x)^4*tan(
c)^2 - 2*tan(d*x)^3*tan(c) + tan(d*x)^2*tan(c)^2 + tan(d*x)^2 - 2*tan(d*x)*tan(c) + 1))*tan(d*x)^5*tan(c)^5 +
6*tan(d*x)^6*tan(c)^4 - 54*tan(d*x)^5*tan(c)^5 + 6*tan(d*x)^4*tan(c)^6 + 90*log(4*(tan(c)^2 + 1)/(tan(d*x)^4*t
an(c)^2 - 2*tan(d*x)^3*tan(c) + tan(d*x)^2*tan(c)^2 + tan(d*x)^2 - 2*tan(d*x)*tan(c) + 1))*tan(d*x)^4*tan(c)^4
 - 3*tan(d*x)^6*tan(c)^2 - 36*tan(d*x)^5*tan(c)^3 + 99*tan(d*x)^4*tan(c)^4 - 36*tan(d*x)^3*tan(c)^5 - 3*tan(d*
x)^2*tan(c)^6 - 120*log(4*(tan(c)^2 + 1)/(tan(d*x)^4*tan(c)^2 - 2*tan(d*x)^3*tan(c) + tan(d*x)^2*tan(c)^2 + ta
n(d*x)^2 - 2*tan(d*x)*tan(c) + 1))*tan(d*x)^3*tan(c)^3 + 2*tan(d*x)^6 + 18*tan(d*x)^5*tan(c) + 90*tan(d*x)^4*t
an(c)^2 - 72*tan(d*x)^3*tan(c)^3 + 90*tan(d*x)^2*tan(c)^4 + 18*tan(d*x)*tan(c)^5 + 2*tan(c)^6 + 90*log(4*(tan(
c)^2 + 1)/(tan(d*x)^4*tan(c)^2 - 2*tan(d*x)^3*tan(c) + tan(d*x)^2*tan(c)^2 + tan(d*x)^2 - 2*tan(d*x)*tan(c) +
1))*tan(d*x)^2*tan(c)^2 - 3*tan(d*x)^4 - 36*tan(d*x)^3*tan(c) + 99*tan(d*x)^2*tan(c)^2 - 36*tan(d*x)*tan(c)^3
- 3*tan(c)^4 - 36*log(4*(tan(c)^2 + 1)/(tan(d*x)^4*tan(c)^2 - 2*tan(d*x)^3*tan(c) + tan(d*x)^2*tan(c)^2 + tan(
d*x)^2 - 2*tan(d*x)*tan(c) + 1))*tan(d*x)*tan(c) + 6*tan(d*x)^2 - 54*tan(d*x)*tan(c) + 6*tan(c)^2 + 6*log(4*(t
an(c)^2 + 1)/(tan(d*x)^4*tan(c)^2 - 2*tan(d*x)^3*tan(c) + tan(d*x)^2*tan(c)^2 + tan(d*x)^2 - 2*tan(d*x)*tan(c)
 + 1)) + 11)/(d*tan(d*x)^6*tan(c)^6 - 6*d*tan(d*x)^5*tan(c)^5 + 15*d*tan(d*x)^4*tan(c)^4 - 20*d*tan(d*x)^3*tan
(c)^3 + 15*d*tan(d*x)^2*tan(c)^2 - 6*d*tan(d*x)*tan(c) + d)